// START SNIPPET: RecipeEquipmentDaoHibernate
package nothing.dao.hibernate;

import nothing.model.RecipeEquipment;
import nothing.dao.RecipeEquipmentDao;
import org.appfuse.dao.hibernate.GenericDaoHibernate;

import java.util.List;

public class RecipeEquipmentDaoHibernate extends GenericDaoHibernate<RecipeEquipment, Long> implements RecipeEquipmentDao {

    public RecipeEquipmentDaoHibernate() {
        super(RecipeEquipment.class);
    }

    @SuppressWarnings("unchecked")
    public List<RecipeEquipment> findByRecipeName(String name) {
        return getHibernateTemplate().find("from RecipeEquipment re, Recipe r where re.recipe=r and r.name=?", name);
    }
}
// START SNIPPET: RecipeEquipmentDaoHibernate

